package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.RelationCartoonAuthorMapper;
import com.gtenacg.cartoonservice.pojo.model.RelationCartoonAuthor;
import com.gtenacg.cartoonservice.service.RelationCartoonAuthorService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【relation_cartoon_author(漫画与作者联系表)】的数据库操作Service实现
* @createDate 2024-05-13 16:07:20
*/
@Service
@RequiredArgsConstructor
public class RelationCartoonAuthorServiceImpl implements RelationCartoonAuthorService{
    private final RelationCartoonAuthorMapper relationMapper;

    @Override
    public List<RelationCartoonAuthor> getByCids(List<Integer> cids) {
        return relationMapper.getByCids(cids);
    }

    @Override
    public List<RelationCartoonAuthor> list() {
        return relationMapper.list();
    }

    @Override
    public Integer insert(RelationCartoonAuthor relationCartoonAuthor) {
        relationMapper.insert(relationCartoonAuthor);
        return relationCartoonAuthor.getRcaid();
    }

    @Override
    public void update(RelationCartoonAuthor relationCartoonAuthor) {
        relationMapper.update(relationCartoonAuthor);
    }

    @Override
    public void delete(List<Integer> ids) {
        relationMapper.delete(ids);
    }

    @Override
    public List<RelationCartoonAuthor> search(Integer cid, Integer aid) {
        return relationMapper.search(cid, aid);
    }
}




